home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
vsix60.exe
/
lha
/
ERRORSYS.LZH
/
ERRORSYS.PRG
< prev
Wrap
Text File
|
1990-08-31
|
9KB
|
362 lines
* ERRORSYS.PRG - The Clipper Error System
* Copyright (c) 1990 by Vernon E. Six, Jr.
* All Rights Reserved World Wide
*
* Written by: Vernon E. Six, Jr.
* 1333 West Campbell Road, #151
* Richardson, Texas 75080
*
* Last Update: Sun 08-05-1990 19:24:35
*
*****************************************************************************
FUNCTION db_error
PARAMETERS pc_name, pn_line, pc_info
PRIVATE c_response
SET DEVICE TO SCREEN
c_response = ERROR_MSG("DB_ERROR", pc_name, pn_line, pc_info)
DO CASE
CASE c_response $ "Aa" && Abort
SET CURSOR ON
SET COLOR TO W/N
@ 23, 0 CLEAR
QUIT
CASE c_response $ "Rr" && Retry
RETURN(.T.)
CASE c_response $ "Ii" && Ignore
BREAK
ENDCASE
RETURN(.F.)
*****************************************************************************
FUNCTION expr_error
PARAMETERS pc_name, pn_line, pc_info, pc_operation, ;
pc_op1, pc_op2, pc_op3, pc_op4, pc_op5
PRIVATE c_response
SET DEVICE TO SCREEN
pc_op1 = IF( TYPE("pc_op1") == "U", "<none>", pc_op1)
pc_op2 = IF( TYPE("pc_op2") == "U", "<none>", pc_op2)
pc_op3 = IF( TYPE("pc_op3") == "U", "<none>", pc_op3)
pc_op4 = IF( TYPE("pc_op4") == "U", "<none>", pc_op4)
pc_op5 = IF( TYPE("pc_op5") == "U", "<none>", pc_op5)
c_response = ERROR_MSG("EXPR_ERROR", pc_name, pn_line, pc_info, ;
pc_operation, pc_op1, pc_op2, pc_op3, pc_op4, pc_op5)
DO CASE
CASE c_response $ "Aa" && Abort
SET CURSOR ON
SET COLOR TO W/N
@ 23, 0 CLEAR
QUIT
CASE c_response $ "Rr" && Retry
BREAK
CASE c_response $ "Ii" && Ignore
BREAK
ENDCASE
RETURN(.F.)
*****************************************************************************
FUNCTION misc_error
PARAMETERS pc_name, pn_line, pc_info, pc_operation
PRIVATE c_response
SET DEVICE TO SCREEN
c_response = ERROR_MSG("MISC_ERROR", pc_name, pn_line, pc_info, ;
pc_operation)
DO CASE
CASE c_response $ "Aa" && Abort
SET CURSOR ON
SET COLOR TO W/N
@ 23, 0 CLEAR
QUIT
CASE c_response $ "Rr" && Retry
RETURN(.T.)
CASE c_response $ "Ii" && Ignore
BREAK
ENDCASE
RETURN(.F.)
*****************************************************************************
FUNCTION open_error
PARAMETERS pc_name, pn_line, pc_info, pc_operation, pc_op1
IF NETERR() .AND. pc_operation == "USE"
RETURN .F.
ENDIF
SET DEVICE TO SCREEN
pc_op1 = IF( TYPE("pc_op1") == "U", "<none>" , pc_op1)
c_response = ERROR_MSG("OPEN_ERROR", pc_name, pn_line, pc_info, ;
pc_operation, pc_op1)
DO CASE
CASE c_response $ "Aa" && Abort
SET CURSOR ON
SET COLOR TO W/N
@ 23, 0 CLEAR
QUIT
CASE c_response $ "Rr" && Retry
RETURN(.T.)
CASE c_response $ "Ii" && Ignore
BREAK
ENDCASE
RETURN(.F.)
*****************************************************************************
FUNCTION print_error
PARAMETERS pc_name, pn_line
SET DEVICE TO SCREEN
c_response = ERROR_MSG("PRINT_ERROR", pc_name, pn_line)
DO CASE
CASE c_response $ "Aa" && Abort
SET CURSOR ON
SET COLOR TO W/N
@ 23, 0 CLEAR
QUIT
CASE c_response $ "Rr" && Retry
RETURN(.T.)
CASE c_response $ "Ii" && Ignore
BREAK
ENDCASE
RETURN(.F.)
*****************************************************************************
FUNCTION undef_error
PARAMETERS pc_name, pn_line, pc_info, pc_operation, pc_op1
PRIVATE c_response
SET DEVICE TO SCREEN
pc_op1 = IF( TYPE("pc_op1") == "U", "<none>" , pc_op1)
c_response = ERROR_MSG("UNDEF_ERROR", pc_name, pn_line, pc_operation, pc_op1)
DO CASE
CASE c_response $ "Aa" && Abort
SET CURSOR ON
SET COLOR TO W/N
@ 23, 0 CLEAR
QUIT
CASE c_response $ "Rr" && Retry
RETURN(.T.)
CASE c_response $ "Ii" && Ignore
BREAK
ENDCASE
RETURN(.F.)
*****************************************************************************
FUNCTION error_msg
PARAMETERS pc_proc, pc_name, pn_line, pc_info, pc_operation, ;
pc_op1, pc_op2, pc_op3, pc_op5, pc_op6
PRIVATE n_dos_err, n_return, ac_err[88]
pc_info = IF( "U"$TYPE("pc_info"), "<none>", pc_info)
pc_operation = IF( "U"$TYPE("pc_operation"), "<none>", pc_operation)
pc_op1 = IF( TYPE("pc_op1") == "U", "<none>", pc_op1)
pc_op2 = IF( TYPE("pc_op2") == "U", "<none>", pc_op2)
pc_op3 = IF( TYPE("pc_op3") == "U", "<none>", pc_op3)
pc_op4 = IF( TYPE("pc_op4") == "U", "<none>", pc_op4)
pc_op5 = IF( TYPE("pc_op5") == "U", "<none>", pc_op5)
ac_err[ 1] = "Invalid function number"
ac_err[ 2] = "File not found"
ac_err[ 3] = "Path not found"
ac_err[ 4] = "Too many open files (no handles left)"
ac_err[ 5] = "Access denied"
ac_err[ 6] = "Invalid handle"
ac_err[ 7] = "Memory control blocks destroyed"
ac_err[ 8] = "Insufficient memory"
ac_err[ 9] = "Invalid memory block address"
ac_err[10] = "Invalid environment"
ac_err[11] = "Invalid format"
ac_err[12] = "Invalid access code"
ac_err[13] = "Invalid data"
ac_err[14] = "Reserved"
ac_err[15] = "Invalid drive was specified"
ac_err[16] = "Attempt to remove the current directory"
ac_err[17] = "Not same device"
ac_err[18] = "No more files"
ac_err[19] = "Attempted write on write-protected disk"
ac_err[20] = "Unknown unit"
ac_err[21] = "Drive not ready"
ac_err[22] = "Unknown command"
ac_err[23] = "Data error (CRC)"
ac_err[24] = "Bad request structure length"
ac_err[25] = "Seek error"
ac_err[26] = "Unknown media type"
ac_err[27] = "Sector not found"
ac_err[28] = "Printer out of paper"
ac_err[29] = "Write fault"
ac_err[30] = "Read fault"
ac_err[31] = "General failure"
ac_err[32] = "Sharing violation"
ac_err[33] = "Lock violation"
ac_err[34] = "Invalid disk change"
ac_err[35] = "FCB unavailable"
ac_err[36] = "Sharing buffer overflow"
ac_err[37] = "Reserved"
ac_err[38] = "Reserved"
ac_err[39] = "Reserved"
ac_err[40] = "Reserved"
ac_err[41] = "Reserved"
ac_err[42] = "Reserved"
ac_err[43] = "Reserved"
ac_err[44] = "Reserved"
ac_err[45] = "Reserved"
ac_err[46] = "Reserved"
ac_err[47] = "Reserved"
ac_err[48] = "Reserved"
ac_err[49] = "Reserved"
ac_err[50] = "Network request not supported"
ac_err[51] = "Remote computer not listening"
ac_err[52] = "Duplicate name on network"
ac_err[53] = "Network name not found"
ac_err[54] = "Network busy"
ac_err[55] = "Network device no longer exists"
ac_err[56] = "Network BIOS command limit exceeded"
ac_err[57] = "Network adapter hardware error"
ac_err[58] = "Incorrect response from network"
ac_err[59] = "Unexpected network error"
ac_err[60] = "Incompatible remote adapter"
ac_err[61] = "Print queue full"
ac_err[62] = "Not enough space for print file"
ac_err[63] = "Print file deleted (not enough space)"
ac_err[64] = "Network name deleted"
ac_err[65] = "Access denied"
ac_err[66] = "Network device type incorrect"
ac_err[67] = "Network name not found"
ac_err[68] = "Network name limit exceeded"
ac_err[69] = "Network BIOS session limit exceeded"
ac_err[70] = "Temporarily paused"
ac_err[71] = "Network request not accepted"
ac_err[72] = "Print or disk redirection paused"
ac_err[73] = "Reserved"
ac_err[74] = "Reserved"
ac_err[75] = "Reserved"
ac_err[76] = "Reserved"
ac_err[77] = "Reserved"
ac_err[78] = "Reserved"
ac_err[79] = "Reserved"
ac_err[80] = "File already exists"
ac_err[81] = "Reserved"
ac_err[82] = "Cannot make directory entry"
ac_err[83] = "Fail on INT 24H"
ac_err[84] = "Too many redirections"
ac_err[85] = "Duplicate redirection"
ac_err[86] = "Invalid password"
ac_err[87] = "Invalid parameter"
ac_err[88] = "Network device fault"
GRABSCRN()
VWIND(2,16,22,63,"Warning: "+pc_proc,"")
@ 04,18 SAY " Process: " + pc_name
@ 05,18 SAY " Line: " + ALLTRIM(STR(pn_line))
@ 06,18 SAY " Info: " + pc_info
@ 07,18 SAY "Operation: " + pc_operation
@ 08,18 SAY " Parm 1: "
@ 08,29 SAY pc_op1
@ 09,18 SAY " Parm 2: "
@ 09,29 SAY pc_op2
@ 10,18 SAY " Parm 3: "
@ 10,29 SAY pc_op3
@ 11,18 SAY " Parm 4: "
@ 11,29 SAY pc_op4
@ 12,18 SAY " Parm 5: "
@ 12,29 SAY pc_op5
n_dos_err = Doserror()
@ 13,18 SAY " Message : " + IF(n_dos_err == 0, "<unspecified>", ac_err[n_dos_err])
@ 14,18 SAY " "
@ 15,18 SAY "An error has occurred, please write down the"
@ 16,18 SAY "information provided and select one of the "
@ 17,18 SAY "following courses of action. "
@ 18,18 SAY " "
@ 19,18 SAY " "
CLEAR TYPEAHEAD
@ 20,27 PROMPT "Abort"
@ 20,36 PROMPT "Retry"
@ 20,46 PROMPT "Ignore"
MENU TO n_return
PUTSCRN()
DO CASE
CASE n_return = 2
RETURN("R")
CASE n_return = 3
RETURN("I")
ENDCASE
RETURN("A")
*****************************************************************************